﻿using DevTeam;
using System;
using System.Data;

namespace ConfExpert.Forms.Du4
{
    public partial class ManualKesim : XPopupForm
    {
        public ManualKesim()
        {
            InitializeComponent();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            DataTable dt = Session.DataManager.ExecuteDataTable("Du4TopKesManual", int.Parse(txtDosyaNo.Text), int.Parse(txtRollId.Text), Convert.ToDecimal(txtQty.Text));
            string message = dt.Rows[0][0].ToString();
            if (message.ToLower().Contains("hata"))
            {
                ShowErrorMessage(message);
            }
            else
            {
                ShowInfoMessage(string.Format("{0} ID'li top kesildi.", txtRollId.Text));
            }
            
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        private void ManualKesim_Load(object sender, EventArgs e)
        {

        }
    }
}